﻿@page
@model PreviewModel
@{
    ViewData["Title"] = "预览";
    ResponseDto resDto = (ResponseDto)ViewData["model"];
    Layout = null;
}

<style>
    .iframe {
        width: 100%;
        height: 98%;
        border: 2px solid #00000038;
    }
</style>

@if (resDto.IsSuccess)
{
    if (resDto.FileInfo.FileType == FILETYPE.IMAGE)
    {
        <partial name="Partial/Image" />
    }
    else if (resDto.FileInfo.FileType == FILETYPE.PDF)
    {
        <partial name="Partial/PDF" />
    }
    else if (resDto.FileInfo.FileType == FILETYPE.COMPRESS || resDto.FileInfo.FileType == FILETYPE.FOLDER)
    {
        <partial name="Partial/Compress" />
    }
    else if (resDto.FileInfo.FileType == FILETYPE.PASSWORD)
    {
        <partial name="Partial/Password" />
    }
    else
    {
        <partial name="Partial/Html" />
    }
}
@if (!resDto.IsSuccess)
{
    <partial name="Partial/Error" />
}